package com.example.ojcodesandbox.demo;

import io.swagger.models.auth.In;

import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    PriorityQueue<Integer> queue = new PriorityQueue<>((a, b) -> a - b);
    for (int i = 0; i < n; i++) {
      int x = sc.nextInt();
      queue.add(x);
    }
    int pre = -1;
    while (!queue.isEmpty() && --k >= 0) {
      pre = queue.poll();
      while (!queue.isEmpty() && queue.peek() == pre) {
        queue.poll();
      }
    }
    if (k == -1) {
      System.out.print(pre);
    } else {
      System.out.print("NO RESULT");
    }
  }
}
